package controller

import (
	"github.com/gin-gonic/gin"
)

func AuthCheck(c *gin.Context) {

	c.JSON(200, gin.H{"message": "检测 Token成功", "status": "success", "result": "ok"})

}

func AuthToken(c *gin.Context) {

	c.JSON(200, gin.H{"message": "成功", "status": "success", "result": "test1"})

}

func AuthRenewal(c *gin.Context) {
	result := make(map[string]interface{})
	result["auth_token"] = "test1"
	result["expires_in"] = 100000000
	c.JSON(200, gin.H{"message": "成功", "status": "success", "result": result})

}

func AuthAdmin(c *gin.Context)  {

	result := make(map[string]string)
	result["name"] = "Admin"
	result["slogn"] = "veact admin system"
	result["gravatar"] = "/veact-admin/images/profile/logo-smooth.png"
	result["_id"] = "589e015d5af07d59124234cc"
	result["__v"] = "0"

	c.JSON(200, gin.H{"message": "获取管理员信息成功", "status": "success", "result": result})

}